import request from '@/utils/request.js'
import upload from '@/utils/upload.js'

export const getSlideList = data => {
  return request({
    method: 'post',
    url: 'api/System/LoadBaner',
    data
  })
}

export const loadAllType = data => {
  return request({
    method: 'post',
    url: 'api/System/LoadMotionType',
    data
  })
}

export const updateBanner = data => {
  return request({
    method: 'post',
    url: 'api/System/UpdateBaner',
    data
  })
}

export const addBanner = data => {
  return request({
    method: 'post',
    url: 'api/System/AddBaner',
    data
  })
}

export const uploadPic = data => {
  return upload({
    method: 'post',
    url: 'api/File/Upload',
    data,
    headers: { 'Content-Type': 'multipart/form-data' }
  })
}

export const deleBanner = data => {
  return request({
    method: 'post',
    url: 'api/System/DeleteBaner',
    data
  })
}

export const queryMenu = data => {
  return request({
    method: 'post',
    url: 'api/Menu/QueryMenu',
    data
  })
}

export const initMenu = data => {
  return request({
    url: 'api/Menu/Init',
    data
  })
}

export const queryAllMenu = data => {
  return request({
    method: 'post',
    url: 'api/Menu/Query',
    data
  })
}